const KoaRouter = require('@koa/router')
const { verifyAuthorization } = require('../middleware/login.middleware')
const collectController = require('../controller/collect.controller')

const collectRouter = new KoaRouter({ prefix: '/collect' })

// 获取收藏数据接口
collectRouter.get('/', verifyAuthorization, collectController.showCollectedList)
// 添加收藏数据接口
collectRouter.post('/', verifyAuthorization, collectController.addCollectedList)
// 取消收藏数据接口
collectRouter.delete('/', verifyAuthorization, collectController.deletdUserCollection)

module.exports = collectRouter